package chapter1028;

public class Test {
    public static void main(String[] args) {
        Weapon weapon = new Knife();
        Hero3 hero = new Hero3();

        weapon = new Sword();
        hero.fight(weapon);

        Food food = new Apple();
        hero.eat(food);
    }
}
